<?php

    define('VERSION', 0.1);
    define('DS', DIRECTORY_SEPARATOR);
    define('EXT', '.php');
    define('ROOT_PATH', str_replace('phar://', '', __DIR__).DS);
    // define('ROOT_PATH', __DIR__.DS);
    define('VENDOR_PATH', ROOT_PATH.'vendor'.DS);
    define('LICO_PATH', ROOT_PATH.'lico'.DS);
    define('SERVER_DOMAIN', $_SERVER['SERVER_NAME']);
    define('START_TIME', microtime(true));  //初始执行时间
    define('START_MEM', memory_get_usage());//初始占用内存

    const SYSCONFIG = [
        'Debug'=>true,
        'App'=>[
            'main'=>'app',
            'config'=>'config.php',
            'module'=>'index',
            'version'=>'v1',
            'controller'=>'index',
            'method'=>'index',
        ],
        'Public'=>[
            'main'=>'public',
            'static'=>'static',
        ],
        'Log'=>[
            'main'=>'logs',
            'type'=>'file',
        ],
        'Database'=>[
            'main'=>'database',
        ],
        'Config'=>[
            'main'=>'config',
        ],
        'Middleware'=>[
            'main'=>'middleware',
        ],
        'Route'=>[
            'main'=>'route',
            'strictMode'=>false,
        ],
    ];
    define('APP_PATH', ROOT_PATH.SYSCONFIG['App']['main'].DS);
    define('PUBLIC_PATH', ROOT_PATH.SYSCONFIG['Public']['main'].DS);
    define('STATIC_PATH', PUBLIC_PATH.SYSCONFIG['Public']['static'].DS);
